<template>
  <div class="home"></div>
</template>

<script>
import { getIndex } from "../api/index";
export default {
  name: "Home",
  data() {
    return {};
  },
  async created(){
    //异步方法
    getIndex().then(res=>{
      console.log(res)
    }).catch(err=>{
      console.log(err)
    })

    //同步方法
    let res=await getIndex()
    console.log(res)
  }
};
</script>
